﻿<Page
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	x:Class="Robert.TwitBy.Views.LoginPage"
	x:Name="Login"
	WindowTitle="Page"
	FlowDirection="LeftToRight">
	<DockPanel>
			<TextBlock DockPanel.Dock="Top"
				       Foreground="White" FontSize="50"
                       FontWeight="Bold"
				       Text="Login"/>
			<TextBlock Margin="0,10,0,0"
                       DockPanel.Dock="Top"
                       Foreground="White" TextWrapping="Wrap" TextAlignment="Center"
                       FontSize="15"
                       Text="TwitBy is using OAuth to authenticate with Twitter. Press Request PIN to give TwitBy access."/>
			<Grid Margin="0,30,0,0"
                  DockPanel.Dock="Top">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<Label Grid.Column="0" VerticalAlignment="Center" Margin="3,0"
                       FontSize="15"
                       Foreground="White" Content="_PIN:" Target="{Binding ElementName=PINBox}"/>
				<TextBox x:Name="PINBox"
                         Grid.Column="1" Margin="3,0"
                         TextWrapping="Wrap"
                         Text="{Binding Pin, UpdateSourceTrigger=PropertyChanged}"/>
			</Grid>
			<TextBlock DockPanel.Dock="Top" Margin="0,15,0,0"
                       Foreground="White" TextWrapping="Wrap"
                       FontSize="15" TextAlignment="Center"
                       Text="When you're done just press Enter."/>
			<StackPanel DockPanel.Dock="Top" 
                        Orientation="Horizontal" 
                        HorizontalAlignment="Center" VerticalAlignment="Center">
				<Button Content="Request PIN" 
                        Margin="3" 
                        Padding="4" 
                        Command="{Binding GetPinCommand}"/>
				<Button Content="OK"
                        Margin="3"
                        Padding="4"
                        Command="{Binding AuthenticateCommand}"/>
			</StackPanel>
            <TextBlock DockPanel.Dock="Top" Margin="0,15,0,0"
                       Foreground="White" TextWrapping="Wrap"
                       TextAlignment="Center"
                       Text="{Binding PinText, UpdateSourceTrigger=PropertyChanged}"/>
		</DockPanel>
</Page>